-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert node.js
to ESM
#32
base: master
Are you sure you want to change the base?
Conversation
@heineiuo Can you please merge this one in ? |
Is there any reason to do this? As upstream package ( |
I don't remember the exact details, but It has give me problems on hibrid environments, since browser import was ESM and Node.js one was CommonJS, correct aproach is to unify everything as ESM, as this PR does. After this change, everything is working flawlessly. |
Any update on this? Can it be merged? |
I'll keep this pr open until |
It will not happen in the foreseen: websockets/ws#1886. I think we should NOT wait to |
I don't understand why, but when using isomorphic-ws with Web Dev Server, it only compiles successfully when converting node.js to ESM. Here's reproduction for it https://github.com/jost-s/wds-error-reproduction I've raised the issue in the WDS repo too modernweb-dev/web#1700 (comment) |
@heineiuo consider this solution as an alternative that you can apply today: #30 (comment) Effectively keeping this as CJS, but exporting an equivalent ESM version separately for those that need it. |
I like it, can you do a PR? |
|
In general, this should work better in terms of backward compatibility |
No description provided.